<template>
  <div class="prompt">
    <div class="prompt-content">{{promptContent}}没用到该组件</div>
    <div class="prompt-choose">
      <span class="pass" @click="clickPass">取消</span>
      <span class="ok" @click="clickOk">确定</span>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'prompt',
    props: {
      promptContent: {
        type: String
      },
      isPrompt: {
        type: Boolean
      }
    },
    methods: {
      clickPass() {
        alert(1)
        return false;
      },
      clickOk() {
        alert(2)
        return true;
      }
    }
  }
</script>

<style scoped lang="scss">
  .prompt {
    position: absolute;
    top: 30%;
    left: 50%;
    width: 70%;
    height: 150px;
    border-radius: 20px;
    background: #fff;
    margin-left: -35%;
    overflow: hidden;
    .prompt-content {
      width: 100%;
      height: 100px;
      border-bottom: 1px solid #e2e2e2;
      text-align: center;
      line-height: 100px;
      font-size: 18px;
      color: #333;
    }
    .prompt-choose {
      width: 100%;
      color: #f76763;
      line-height: 50px;
      font-size: 0;
      .pass {
        display: inline-block;
        height: 50px;
        width: 50%;
        font-size: 18px;
        text-align: center;
        border-right: 1px solid #e2e2e2;
      }
      .ok {
        display: inline-block;
        height: 50px;
        width: calc(50% - 1px);
        font-size: 18px;
        text-align: center;
      }
    }
  }
</style>
